package Collection.list;

import org.junit.Test;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.ListIterator;

public class ArrayListTest {
    public static void main(String[] args) {
        ArrayList<Integer> integers = new ArrayList<>();
        Integer integer = new Integer(1000);
        integers.add(integer);
    }
    @Test
    public void method1(){
        ArrayList<Integer> list = new ArrayList<>();
        list.add(1);
        list.add(2);
        list.add(3);
        ListIterator<Integer> listIterator = list.listIterator();
        System.out.println( listIterator.next());

        listIterator.add(100);
        System.out.println( listIterator.next());
        System.out.println( listIterator.previous());
    }
}
